package com.example.common.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;

//        +----------+---------------+------+-----+---------+----------------+
//        | Field    | Type          | Null | Key | Default | Extra          |
//        +----------+---------------+------+-----+---------+----------------+
//        | id       | int(11)       | NO   | PRI | NULL    | auto_increment |
//        | aid      | int(11)       | YES  | MUL | NULL    |                |
//        | uid      | int(11)       | YES  | MUL | NULL    |                |
//        | username | varchar(100)  | NO   |     | NULL    |                |
//        | photo    | varchar(500)  | YES  |     |         |                |
//        | comment  | varchar(1000) | YES  |     | NULL    |                |
//        +----------+---------------+------+-----+---------+----------------+

@Data
public class CommentInfo {

    private Integer id;
    private Integer aid;
    private Integer uid;
    private String nickname;
    private String photo;
    private String comment;
    //格式化时间处理
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDateTime createtime;
}
